﻿using System;
using Org.BouncyCastle.Asn1;

namespace TheClerk.Forms.Templates.raw.Envelope
{

    /// <remarks>
    /// A class to hold standard values, such as object identifiers
    /// </remarks>
    static class TheClerkObjectIdentifiers
    {
        static readonly DerObjectIdentifier idTheClerk = new DerObjectIdentifier("1.3.6.1.4.1.22232.7");
        static readonly DerObjectIdentifier idForm = new DerObjectIdentifier(idTheClerk + ".1");
        static readonly DerObjectIdentifier idCopyrightLicense = new DerObjectIdentifier(idForm + ".3");
        static readonly DerObjectIdentifier idEnvelope = new DerObjectIdentifier(idForm + ".1");
        static readonly DerObjectIdentifier idLicenseCreativeCommons = new DerObjectIdentifier(idCopyrightLicense + ".1");
        static readonly DerObjectIdentifier idLicenseCommercialInterest = new DerObjectIdentifier(idCopyrightLicense + ".2");

        public static readonly System.Collections.Generic.Dictionary<string, DerObjectIdentifier> dic =
            new System.Collections.Generic.Dictionary<string, DerObjectIdentifier>();

        static TheClerkObjectIdentifiers()
        {
            dic["idTheClerk"] = new DerObjectIdentifier(idTheClerk.ToString());
            dic["idForm"] = new DerObjectIdentifier(idForm.ToString());
            dic["idEnvelope"] = new DerObjectIdentifier(idForm.ToString() + ".0");
            dic["idForm"] = new DerObjectIdentifier(idTheClerk + ".1");
            dic["idEnvelope"] = new DerObjectIdentifier(idForm + ".1");
            dic["idOpaquePayload"] = new DerObjectIdentifier(idEnvelope + ".1");
            dic["idStrongBox"] = new DerObjectIdentifier(idEnvelope + ".2");
            dic["idCopyrightLicense"] = new DerObjectIdentifier(idCopyrightLicense.ToString());
            dic["idLicenseAllRightsReserved"] = new DerObjectIdentifier(idCopyrightLicense + ".0");
            dic["idLicenseCreativeCommons"] = new DerObjectIdentifier(idCopyrightLicense + ".1");
            dic["idPD0"] = new DerObjectIdentifier(idLicenseCreativeCommons + ".0");
            dic["idBY"] = new DerObjectIdentifier(idLicenseCreativeCommons + ".1");
            dic["idBY_NC"] = new DerObjectIdentifier(idLicenseCreativeCommons + ".2");
            dic["idBY_NC_ND"] = new DerObjectIdentifier(idLicenseCreativeCommons + ".3");
            dic["idBY_ND"] = new DerObjectIdentifier(idLicenseCreativeCommons + ".4");
            dic["idBY_SA"] = new DerObjectIdentifier(idLicenseCreativeCommons + ".5");
            dic["idBY_NC_SA"] = new DerObjectIdentifier(idLicenseCreativeCommons + ".6");
            dic["idLicenseCommercialInterest"] = new DerObjectIdentifier(idCopyrightLicense + ".2");
            dic["idMayStore"] = new DerObjectIdentifier(idLicenseCommercialInterest + ".1");
            dic["idMayContactPostal"] = new DerObjectIdentifier(idLicenseCommercialInterest + ".2");
            dic["idMayContactPhone"] = new DerObjectIdentifier(idLicenseCommercialInterest + ".3");
            dic["idMayContactEmail"] = new DerObjectIdentifier(idLicenseCommercialInterest + ".4");
            dic["idMayContactForHirePostal"] = new DerObjectIdentifier(idLicenseCommercialInterest + ".5");
            dic["idMayContactForHirePhone"] = new DerObjectIdentifier(idLicenseCommercialInterest + ".5");
            dic["idMayContactForHireEmail"] = new DerObjectIdentifier(idLicenseCommercialInterest + ".6");
            dic["idMayShareOrderInformation"] = new DerObjectIdentifier(idLicenseCommercialInterest + ".7");
            dic["idMayShareWithThirdParty"] = new DerObjectIdentifier(idLicenseCommercialInterest + ".8");
            dic["idStamps"] = new DerObjectIdentifier(idEnvelope + ".4");
        }

    }
}
